<?php $this->load->module('mobile/index/header', $common);?>
<style>
    #list-profile img{
        height: auto;
        width: 100%;
    }
    #list-profile {
        background:none;
    }
</style>
<div class="content">

        <div id="sliderimg" class="slider">
            <ul>
                <?php foreach($scenic['photo'] as $k=>$v):?>
                    <li><a href="#"><img src="<?php  echo filter_img($v['url']) ;?>" onerror="this.error=null;this.src='<?php echo URLPRE;?>static/public/images/nophoto.jpg'"></a></li>
                <?php endforeach ;?>
            </ul>
        </div>

        <nav class="scenerys">
            <div class="list-item fn-clear udline">
                <h3 class="mt_h3"><?php  echo $scenic['name'] ;?></h3>
                <p>景区等级:<?php echo str_repeat('A',$scenic['level']);?></p>
                <p><span class="map"></span>
                    <?php echo $scenic['address'] ;?>
                </p>
            </div>
        </nav>

        <div class="content-wrap">
            <div class="noticeTip fn-clear">如需预订，您最晚要在游玩<font class="font-orange">
                    <?php
                    echo !empty($ticket[0]['earlier_date']) ? "前".$ticket[0]['earlier_date']."天," : '当天';
                    echo !empty($ticket[0]['earlier_time']) ? $ticket[0]['earlier_time'] : '00:00';
                    ?>
                </font>前下单，请尽早预订。每人最多限购1张。<a class="notice-url" href="">预订须知<em class="url-ico"></em></a></div>
            <article class="tickets">
                <?php foreach($ticket as $k=>$v):?>

                <dl class="ticket return">
                    <dt><?php echo $v['category_name'];?></dt>
                    <dd>
                        <h4 class="h4"><?php echo $v['name'];?></h4>
                        <p class="detail">
                             <?php if($v['prices']['display_price']=='电询'):?>
                                <span class="tc-price">电询</span>
                             <?php else: ?>
                            <span class="tc-price">¥<?php echo $v['prices']['price'];?></span>
                            <span class="price">¥<?php echo $v['prices']['display_price'];?></span>
                             <?php endif ;?>
                        </p>
                        <p class="icons"> </p>
                        <ul class="btn-box">
                            <?php if($v['prices']['display_price']=='电询'):?>
                                <a class="btn-yd" id="callPhone" href="javascript:void(0)">预订<span class="flag"><?php echo $v['payment_method_name'];?></span>
                                </a>
                            <?php else: ?>
                                <a class="btn-yd" href="<?php echo site_url('/mobile/scenery/order/?ticket_id='.$v['id'].'&scenery_id='.$scenic['id'].'&referer='.$_SERVER['REQUEST_URI']); ?>"> 预订<span class="flag"><?php echo $v['payment_method_name'];?></span>
                                </a>
                            <?php endif ;?>
                            <li></li>
                        </ul>
                    </dd>
                </dl>
               <?php endforeach ;?>
            </article>
        </div>
    <div class="content-wrap" id="list-profile">
        <?php  echo $scenic['content']?>
    </div>
</div>
<?php $this->load->module('mobile/index/footer', $common);?>
<script type="text/javascript">
    $(function(){
        $('#callPhone').click(function(){
            $.dialog({
                style:'tip',
                width:200,
                closeTime:3500,
                content: '<p style="text-align: center">请致电：<a style="color:#00A2D4;text-decoration: underline;" href="tel:<?php echo $site_service_phone ;?>"><?php echo $site_service_phone ;?></a></p>'
            }).open();

        })

        var slid = $("#sliderimg").slider({
            loop: true
        });
    });
</script>